package com.sphd.emanu.fragment.vip;

import android.content.Context;

import com.sphd.emanu.mvp.BasePresenterImpl;
import com.sphd.emanu.pojo.login.Org;
import com.sphd.emanu.utils.GsonUtil;
import com.wzutils.L;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * MVPPlugin
 *  邮箱 784787081@qq.com
 */

public class VipPresenter extends BasePresenterImpl<VipContract.View> implements VipContract.Presenter{

    @Override
    public void selectMember(int org, Integer status) {
        emanuService.selectMember(org, status).enqueue(new Callback<String>() {
            @Override
            public void onResponse(Call<String> call, Response<String> response) {
                L.e(response.toString());
                Org org1= GsonUtil.GsonToBean(response.body(),Org.class);
                mView.recBean(org1);
            }

            @Override
            public void onFailure(Call<String> call, Throwable t) {

            }
        });
    }
}
